package com.example.batchprocessing.step;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class ListenerExample implements JobExecutionListener {

  @Override
  public void beforeJob(JobExecution jobExecution) {
    log.info("测试before，{}", jobExecution.toString());
  }

  @Override
  public void afterJob(JobExecution jobExecution) {
    log.info("测试afterJob，{}", jobExecution.toString());
  }
}
